/**
 * Created by Aigo on 2017/05/31.
 */
$(function () {
    var sort = 101;
    //添加直播
    $("#addData").on("click", function () {
        var loginName = window.localStorage.getItem("loginName");
        $("#sort").val(sort);
        $("#createUser").val(loginName);
        $("#addForm").attr("action", getAdminIP() + "lives");
        $("#addForm").submit();
    })

    //取消添加直播  
    $("#cancelAdd").on("click", function () {
        window.history.go(-1);
    })

    //日期控件
    var startTime = {
        dateCell: "#startTime",
        format: 'YYYY-MM-DD hh:mm:ss',
        isinitVal: false,
        festival: false,
        ishmsVal: false,
        isTime: true,
        maxDate: '2099-06-16 23:59:59'
    };
    jeDate(startTime);
    var endTime = {
        dateCell: "#endTime",
        format: 'YYYY-MM-DD hh:mm:ss',
        isinitVal: false,
        festival: false,
        ishmsVal: false,
        isTime: true,
        maxDate: '2099-06-16 23:59:59'
    };
    jeDate(endTime);
});
